package com.qiaofang.collectmanage.facade.utils;

import java.io.PrintWriter;
import java.io.StringWriter;

public class StringUtils {

    private StringUtils(){}
    
    public static String getStackTrace(Throwable t)
    {
        StringWriter sw = new StringWriter();
        PrintWriter pw = new PrintWriter(sw);
        try
        {
            t.printStackTrace(pw);
            return sw.toString();
        }
        finally
        {
            pw.close();
        }
    }
}
